home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / STRINGS / PACKAGE6 / INTEGER.DOC < prev    next >
Text File  |  1990-07-25  |  2KB  |  44 lines

  1. ------------------------------------------------------------------------------
  2. ReadlnInteger
  3. ------------------------------------------------------------------------------
  4.  
  5. declaration:          procedure ReadlnInteger (var IntegerNumber:
  6.                                                      integer;
  7.                                                var LastKey:
  8.                                                      TypeKey);
  9.  
  10. purpose:              return an integer number and the last key the user input
  11.                       from the keyboard.
  12.  
  13. precondition:         none
  14.  
  15. postcondition:        - Maxint <= IntegerNumber <= Maxint
  16.                       Lastkey is either EscapeKey or CarriageReturn
  17.  
  18. special cases:        if input is larger than -Maxint or Maxint then
  19.                       the computer will not accepted any number and will
  20.                       beep to warn the user of overflow error.
  21.  
  22.                       The User will have option of using the BackSpace
  23.                       Key to delete any number that he or she has been typed
  24.                       in the keyboard.
  25.  
  26. example:              var
  27.                         IntegerNumber:
  28.                           integer;
  29.                         LastKey:
  30.                           Typekey;
  31.  
  32.                       begin
  33.                         .
  34.                         .
  35.                         .
  36.                         ReadlnInteger (InputNumber, LastKey);
  37.                         writeln (output, InputNumber);
  38.                         .
  39.                         .
  40.                         .
  41.                       end
  42.  
  43. -----------------------------------------------------------------------------
  44.